//
//  AlertAction.h
//  JAlertDemo
//
//  Created by mac on 2019/3/14.
//  Copyright © 2019 mac. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>


typedef void (^SelectBlock)(NSString *selectItem);
typedef void (^ConfirmBlock)(void);
typedef void (^CancelBlock)(void);


@interface AlertAction : NSObject

@property (nonatomic, strong) UIViewController *controller;


@property (nonatomic, copy) SelectBlock selectBlock;
@property (nonatomic, copy) ConfirmBlock confirmBlock;
@property (nonatomic, copy) CancelBlock cancelBlock;

+(instancetype)sharedInstance;
-(void)showAlertSheetWithTitle:(NSString *)title
                       message:(NSString *)message
                       itemsArr:(NSArray *)itemsArr
                   selectItemBlock:(void(^)(NSString *selectItem))selectItemBlock;

- (void)showAlertWithTitle:(NSString *)title
                   message:(NSString *)message
           confirmBtnTitle:(NSString *)title
              confirmBlock:(void (^)(void))confirmBlock
              cancelBlock:(void (^)(void))cancelBlock;


@end

